package com.chenfan.mcn.component.dict;

import com.chenfan.common.extension.context.SpringContextHolder;
import com.chenfan.common.extension.dict.DictTranslator;
import com.chenfan.mcn.service.BrandInfoService;

/**
 * @author wulg
 * @date 2023/11/2
 */
public class BrandCodeTranslator implements DictTranslator<String, String> {

    @Override
    public String translate(String code) {
        BrandInfoService brandInfoService = SpringContextHolder.getBean(BrandInfoService.class);
        return brandInfoService.getBrandNameByCode(code);
    }
}
